<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>dfeprach: xdfeprach_examples.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">dfeprach
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xdfeprach__examples_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xdfeprach_examples.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the examples main function. </p>
<p>Note: MGT si570 oscillator is set to 152.25MHz by default. The DFE IP wrapper requires MGT clock to be set to 122.88MHz (some IP use 61.44MHz). Prerequisite is to set the MGT si570 oscillator to the required IP before running the example code. This is for the ZCU670 production platform.</p>
<pre></pre><pre>MODIFICATION HISTORY:</pre><pre>Ver   Who    Date     Changes
</p>
<hr/>
<p>
1.0   dc     03/08/21 Initial version
      dc     04/06/21 Register with full node name
      dc     04/07/21 Fix bare metal initialisation
      dc     04/10/21 Set sequence length only once
1.1   dc     07/13/21 Update to common latency requirements
      dc     07/21/21 Add and reorganise examples
1.3   dc     02/07/22 Configure 2 CC and 3 RC examples
      dc     03/21/22 Add prefix to global variables
1.4   dc     04/26/22 Add dynamic config example
1.7   cog    19/02/24 SDT Support
      cog    04/20/24 Configure si570 in Linux examples</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0ddb0f8ca495eb4e99eabc79fc0d41d1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdfeprach__examples_8c.html#a0ddb0f8ca495eb4e99eabc79fc0d41d1">XDfeSi570_SetMgtOscillator</a> (double CurrentFrequency, double NewFrequency)</td></tr>
<tr class="memdesc:a0ddb0f8ca495eb4e99eabc79fc0d41d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function: initialize I2C bus, reads current state of si570, calculates parameters for si570 MGT oscillator new frequency, writes them to si570 and resets PL to use the new frequency.  <a href="#a0ddb0f8ca495eb4e99eabc79fc0d41d1">More...</a><br/></td></tr>
<tr class="separator:a0ddb0f8ca495eb4e99eabc79fc0d41d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga210a566fa6dbed1e7c36d8b2a2f9696b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___overview.html#ga210a566fa6dbed1e7c36d8b2a2f9696b">XDfePrach_SelfTestExample</a> ()</td></tr>
<tr class="memdesc:ga210a566fa6dbed1e7c36d8b2a2f9696b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example runs the DFE Prach device using the driver APIs.  <a href="group___overview.html#ga210a566fa6dbed1e7c36d8b2a2f9696b">More...</a><br/></td></tr>
<tr class="separator:ga210a566fa6dbed1e7c36d8b2a2f9696b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd47bf94fdf2e70c66193ba7d36baded"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___overview.html#gabd47bf94fdf2e70c66193ba7d36baded">XDfePrach_2CC3RCTestExample</a> ()</td></tr>
<tr class="memdesc:gabd47bf94fdf2e70c66193ba7d36baded"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example runs the DFE Prach device using the driver APIs.  <a href="group___overview.html#gabd47bf94fdf2e70c66193ba7d36baded">More...</a><br/></td></tr>
<tr class="separator:gabd47bf94fdf2e70c66193ba7d36baded"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga80c73e89a6fc66abac088bbc45431dc3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___overview.html#ga80c73e89a6fc66abac088bbc45431dc3">XDfePrach_2CC3RCReconfigureTestExample</a> ()</td></tr>
<tr class="memdesc:ga80c73e89a6fc66abac088bbc45431dc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example runs the DFE Prach device using the driver APIs.  <a href="group___overview.html#ga80c73e89a6fc66abac088bbc45431dc3">More...</a><br/></td></tr>
<tr class="separator:ga80c73e89a6fc66abac088bbc45431dc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1287a30b7e83158a48088593234ab1e4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___overview.html#ga1287a30b7e83158a48088593234ab1e4">XDfePrach_2CC3RCDynamicTestExample</a> ()</td></tr>
<tr class="memdesc:ga1287a30b7e83158a48088593234ab1e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example runs the DFE Prach device using the driver APIs.  <a href="group___overview.html#ga1287a30b7e83158a48088593234ab1e4">More...</a><br/></td></tr>
<tr class="separator:ga1287a30b7e83158a48088593234ab1e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdfeprach__examples_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function that invokes the polled example in this file.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function that invokes the polled example in this file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the example has completed successfully.</li>
<li>XST_FAILURE if the example has failed. </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group___overview.html#ga1287a30b7e83158a48088593234ab1e4">XDfePrach_2CC3RCDynamicTestExample()</a>, <a class="el" href="group___overview.html#ga80c73e89a6fc66abac088bbc45431dc3">XDfePrach_2CC3RCReconfigureTestExample()</a>, <a class="el" href="group___overview.html#gabd47bf94fdf2e70c66193ba7d36baded">XDfePrach_2CC3RCTestExample()</a>, <a class="el" href="group___overview.html#ga210a566fa6dbed1e7c36d8b2a2f9696b">XDfePrach_SelfTestExample()</a>, <a class="el" href="xdfeprach__examples_8c.html#a0ddb0f8ca495eb4e99eabc79fc0d41d1">XDfeSi570_SetMgtOscillator()</a>, <a class="el" href="group__dfeprach.html#ga9478d2b97aa40e09052dee2571940ef9">XST_FAILURE</a>, and <a class="el" href="group__dfeprach.html#ga959ffc15251ddc9b3a883a30f97b7715">XST_SUCCESS</a>.</p>

</div>
</div>
<a class="anchor" id="a0ddb0f8ca495eb4e99eabc79fc0d41d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XDfeSi570_SetMgtOscillator </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>CurrentFrequency</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>NewFrequency</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function: initialize I2C bus, reads current state of si570, calculates parameters for si570 MGT oscillator new frequency, writes them to si570 and resets PL to use the new frequency. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CurrentFrequency</td><td>MGT oscillator current frequency. </td></tr>
    <tr><td class="paramname">NewFrequency</td><td>MGT oscillator new frequency.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="group__dfeprach.html#ga9478d2b97aa40e09052dee2571940ef9">XST_FAILURE</a>, and <a class="el" href="group__dfeprach.html#ga959ffc15251ddc9b3a883a30f97b7715">XST_SUCCESS</a>.</p>

<p>Referenced by <a class="el" href="xdfeprach__examples_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
